/*
               File: dEnCla
        Description: DesEncripta Clave
             Author: GeneXus Java Generator version 8_0_9-040
       Generated on: 28 de Setiembre de 2010 17:21:38.52
       Program type: Callable routine
          Main DBMS: sqlserver
*/
import java.sql.*;
import com.genexus.db.*;
import com.genexus.*;
import com.genexus.distributed.*;

public final class pdencla extends GXProcedure
{
   public pdencla( int remoteHandle )
   {
      super( remoteHandle , new ModelContext( pdencla.class ), "" );
   }

   public pdencla( int remoteHandle ,
                   ModelContext context )
   {
      super( remoteHandle , context, "" );
   }

   public void execute( String aP0 ,
                        String aP1 ,
                        String[] aP2 )
   {
      execute_int(aP0, aP1, aP2);
   }

   private void execute_int( String aP0 ,
                             String aP1 ,
                             String[] aP2 )
   {
      pdencla.this.AV8Usucla = aP0;
      pdencla.this.AV9Usuaux = aP1;
      pdencla.this.aP2 = aP2;
      initialize();
      /* GeneXus formulas */
      /* Output device settings */
      AV11Clave = GXutil.trim( GXutil.substring( AV9Usuaux, 1, 10)) + GXutil.trim( GXutil.substring( AV9Usuaux, 12, 10)) + GXutil.trim( GXutil.substring( AV9Usuaux, 23, 12)) ;
      AV10Usucla = com.genexus.util.Encryption.encrypt64( AV8Usucla, AV11Clave) ;
      AV10Usucla = GXutil.substring( AV10Usucla, 1, 10) ;
      cleanup();
   }

   protected void cleanup( )
   {
      this.aP2[0] = pdencla.this.AV10Usucla;
      exitApplication();
   }

   /* Aggregate/select formulas */
   public void initialize( )
   {
      AV10Usucla = "" ;
      AV11Clave = "" ;
      /* GeneXus formulas. */
      Gx_err = 0 ;
   }

   private short Gx_err ;
   private String AV8Usucla ;
   private String AV9Usuaux ;
   private String AV10Usucla ;
   private String AV11Clave ;
   private String[] aP2 ;
}

